import Layout from '../components/Layout'

let routes = [
  {
    path: '/',
    component: Layout,
    redirect: { path: '/dashboard' },
    meta: {
      title: '根目录',
      icon: 'el-icon-phone-outline',
      hidden: true,
    },
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        meta: {
          title: '仪表盘',
          icon: 'el-icon-user',
        },
        component: () => import('../views/dashboard'),
      },
    ],
  },
  {
    path: '/system',
    component: Layout,
    name: 'system',
    meta: {
      title: '系统设置',
      icon: 'el-icon-goods',
    },
    children: [
      {
        path: 'user',
        name: 'user',
        meta: {
          title: '用户设置',
          icon: 'el-icon-warning-outline',
        },
        component: () => import('../views/users'),
      },
      {
        path: 'role',
        name: 'role',
        meta: {
          title: '角色设置',
          icon: 'el-icon-edit-outline',
        },
        component: () => import('../components/Role'),
      },
      {
        path: 'userRole',
        meta: {
          title: '用户角色',
          icon: 'el-icon-date',
        },
        component: () => import('../components/UserRole'),
      },
      {
        path:'Avatar',
        component:()=>import('../components/Avatar'),
        meta:{
          title:'图片上传',
          icon:'el-icon-view',
        }
        },
      
      {
        path:'FuText',
        component:()=>import('../views/FuText'),
        meta:{
          title:'富文本',
          icon:'el-icon-view',
        },
      
      },
      {
        path:'QRcode',
        component:()=>import('../components/QRcode'),
        meta:{
          title:'二维码管理',
          icon:'el-icon-view',
        },
      
      },
      {
        path:'Slideshow',
        component:()=>import('../components/Slideshow'),
        meta:{
          title:'轮播图管理',
          icon:'el-icon-view',
        },
      
      },
      {
        path:'Media',
        component:()=>import('../components/Media'),
        meta:{
          title:'媒体库',
          icon:'el-icon-view',
        },
      
      }


    ],
  },
  {
    path: '/log',
    component: Layout,
    redirect: { path: '/log/auditinfo' },
    meta: {
      title: '系统日志',
      icon: 'el-icon-coin',
      hidden: true,
    },
    children: [
      {
        path: 'auditinfo',
        name: 'auditinfo',
        meta: {
          title: '审计日志',
          icon: 'el-icon-coin',
        },
        component: () => import('../views/log'),
      },
    ],
  },
  {
    path:'/login',
    component:()=>import('../views/login'),
    meta:{
      title:'登录',
      icon:'el-icon-view',
      hidden:true
    },
  },
]

export default routes
